This invention relates to a variable frequency dividing circuit, and more particularly to a variable frequency dividing circuit which can switch a frequency dividing ratio with a program. Such a frequency dividing circuit includes a register of which the frequency division ratio can be preset variably with a program data. The frequency dividing circuit of this type, for example, is preferably employed for an engine control circuit.
A conventional frequency dividing circuit includes a counter which counts up (or increments) its output data each time the frequency signal to be divided is input, and outputs a frequency division completion signal when the output value of the counter agrees with a preset frequency dividing ratio value in the frequency dividing operation. In this circuit, if the frequency division ratio is changed by the register and the output value of the counter is larger than the frequency division ratio newly preset, the frequency division completion signal will not be output. As a result, the conventional frequency dividing circuit may possibly generate an error in the frequency dividing operation.
Consequently, in conventional measures the switching operation of a frequency division ratio is held deliberately until the previous frequency dividing operation has been completed. In other words, the preset value is not switched to a new frequency division ratio until the counter in a frequency division circuit has been completely reset.
However, the conventional frequency dividing circuit with a stand-by circuit has a disadvantage in that the frequency division operation is delayed, at a maximum, one cycle ranging from a time at which a switching of a frequency division ratio is instructed to a time at which an actual frequency division ratio switching is performed because the frequency dividing ratio is switched simultaneously when the counting operation has been completed.
On the other hand, a method has been employed in which a counter in the frequency dividing circuit is reset in accordance with the switching instruction for a frequency ratio, and the frequency dividing operation is repeated after the frequency division ratio has been switched.
However, this method, in which the counter is forcibly reset, has a disadvantage in that the already counted value is discarded unconditionally, thus resulting in a delay in outputting the frequency division completion signal.